package de.reondo.jos.filters;

public class AndFilter<T> implements IFilter<T> {

	private IFilter<T> filter1;
	private IFilter<T> filter2;
	
	public IFilter<T> getFilter1() {
		return filter1;
	}


	public IFilter<T> getFilter2() {
		return filter2;
	}


	
	public AndFilter(IFilter<T> filter1, IFilter<T> filter2) {
		this.filter1 = filter1;
		this.filter2 = filter2;
	}


	@Override
	public boolean accept(T cls) {
		return filter1.accept(cls) && filter2.accept(cls);
	}

}
